package com.pictureBook.merchant.mapper;

import com.pictureBook.merchant.entity.PictureBook;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.SortedMap;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Ding
 * @since 2022-01-06
 */
@Mapper
public interface PictureBookMapper extends BaseMapper<PictureBook> {

    List<Map<String,Object>> getAllPictureBooks(@Param("soId") Integer soId, @Param("searchData") Map<String, Object> searchData);

    Map<String, Object> getPictureBookByAnISBN(@Param("ISBN") String isbn,@Param("soId") Integer soId);

    Map<String, Object> getPictureBookMainByAnISBN(@Param("ISBN") String isbn);

    int upDateBookNumAddOneById(@Param("pb_id") Integer pb_id,@Param("changeNum") Integer changeNum);

    Integer getLastId();

    List<Map<String, Object>> getPictureBookMainByBookName(@Param("pbName") String pbName);

    Map<String, Object> getPictureBookById(@Param("pbId") Integer pbId);
}
